﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Traceability.ErrorCode
{
    /// <summary>
    /// API统一响应结果
    /// </summary>
    /// <remarks>
    /// 用于统一API接口的响应格式，包含状态码、消息和数据
    /// </remarks>
    /// <typeparam name="T">响应数据的类型</typeparam>
    public class APIResult<T>
    {
        /// <summary>
        /// 响应状态码
        /// </summary>
        /// <remarks>
        /// 表示API调用的结果状态，如成功、失败等
        /// </remarks>
        /// <example>登录成功</example>
        public APIEnum Code { get; set; }

        /// <summary>
        /// 响应消息
        /// </summary>
        /// <remarks>
        /// 对API调用结果的详细描述信息
        /// </remarks>
        /// <example>登录成功</example>
        public string Message { get; set; }

        /// <summary>
        /// 响应数据
        /// </summary>
        /// <remarks>
        /// API调用成功后返回的具体数据内容
        /// </remarks>
        public T Data { get; set; }
    }
}
